// vim: ft=glsl noet ts=4 sw=4 sts=0
#version 330 core
layout(location = 0) in vec2 position;
out vec3 dir;
uniform float focal;
uniform mat3 camera_axis;
uniform float aspect_ratio;
vec2 aspect_correction = vec2(aspect_ratio, 1);

void main()
{
	gl_Position = vec4(position, 0, 1);
	vec2 uv = position * aspect_correction;
	dir = camera_axis * vec3(uv, -focal);
}


